const requireUtilsModules = import.meta.glob('./**/*.js', { eager: true, import: 'default' })

export default {
  install(app) {
    for (const path in requireUtilsModules) {
      const modules = requireUtilsModules[path]
      app.config.globalProperties.$utils = {
        ...app.config.globalProperties.$utils,
        ...modules
      }
    }
    window.$utils = app.config.globalProperties.$utils
  }
}
